<?php
class MisEpisodeHelperTest extends PHPUnit_Framework_TestCase  
{  

    public $eids;
	public function setUp()
	{
        $xml = '<?xml version="1.0" encoding="utf-8"?>
            <Episode CO_CODE="TVB" PGM_ID="016400282" START_SEQ="1" NUM_OF_PROG="10">
            <PID>7269</PID>
            <PID>7267</PID>
            </Episode>';
        $xml_obj = simplexml_load_string($xml);
        foreach($xml_obj->PID as $p){
            $this->eids[] = (string)$p;
        }
	}
	public function tearDown()
	{
	} 

	public function testImport()  
    {  
        $programme_id = 04430443;
        $episode = new MisEpisodeHelper();
        $rs = $episode->import($this->eids,$programme_id);
		$this->assertEquals(true, $rs);
	}
}
